// 这个是用来干嘛的 就是给表单提供数据的
import { reactive } from 'vue'
import { DeptAdd } from '@/api/dept/deptModel'
export default function useBaseModel() {
  const rules = reactive({
    name: [{
      required: true,
      message: '请填写部门名称',
      trigger: 'blur',
    }],
    parentId: [{
      required: true,
      message: '请填写上级部门',
      trigger: 'blur',
    }],
  })
  const dialogModel = reactive<DeptAdd>({
    name: '',
    id:'',
    parentId:''
  })
  return {
    rules, dialogModel
  }
}